Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next
Subject: Export Documents Selected on viewPanel into Excel
Feedback Type: Question
Product Area: Notes Client
Technical Area: Application Development
Platform: ALL
Release: 8.5.1
Reproducible: -Reproducibility-

I am trying to develop an export into Excel routine for documents selected from a viewPanel in the Notes client. And am using a dijit.form.Button.

I can pass a selected id by using the following type of code:
<![CDATA[#{javascript: var docServer = @Name("[CN]", Subset(@DbName(), 1)); var viewPanel=getComponent("viewPanel1"); var docIDArray=viewPanel.getSelectedIds(); var db=session.getDatabase(docServer, "Employer.nsf");
for (i= 0; i < docIDArray.length; i++){
var docId=docIDArray[i];
var agent=db.getAgent("(ExportToExcel)"); agent.run(docId); }
}]]>

However, this only passes the ID one by one, and runs the LotusScript agent to launch Excel and populate the spreadsheet for each document selected. I can't figure out how to gather all the IDs and pass them together.

I have also tried to use Chris Toohey's excel function which uses this type of information:
var exCon = facesContext.getExternalContext();
var writer = facesContext.getResponseWriter();
var response = exCon.getResponse();
response.setContentType("application/vnd.ms-excel");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Content-disposition", "attachment; filename=projects.xls");

but it doesn't do anything for me, or generate any error messages, and I can't quite figure out from what I'm reading on the web what exactly this is doing. I'm thinking this is Java and not JavaScript? Or am I wrong?

Has anybody created an export to Excel function which works with selections made from a viewPanel? Or have any idea how this can be done?

Thanks very much for any suggestions!


Feedback number WEBB85BL8J created by ~Elizabeth Xanjipyskiader on 05/10/2010

Status: Open
Comments:

Export Documents Selected on viewPa... (~Elizabeth Xanj... 10.May.10)
. . is an LS agent an option? (~Ben Asakilying... 10.May.10)
. . . . Calling LotusScript Agent (~Elizabeth Xanj... 10.May.10)
. . . . . . Haven't tested this but... have you... (~Pippy Minfreet... 16.May.10)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS